#pragma once

#include <Util/MsgQueueExThreads.h>

struct upload_pack
{
	HWND imcc;
	CString str_xml;
	aot::imcc::chat_msg_info info;
};


struct http_upload
{
	std::string save_file_name; 
	std::string url;
	std::string md5;
};

class http_upload_thread
	: public _UTIL::CMsgQueueExThreads<upload_pack>
{
public:
	http_upload_thread(void);

	~http_upload_thread(void);

	virtual void OnProcMsgQueueStart();

	virtual void LoopProc(upload_pack* pMsgPack, PWORKER_PARAMETER work_para);

	BOOL push_message(CString str_xml, aot::imcc::chat_msg_info info, HWND imcc);

	BOOL upload_img(CString& xml, HWND imcc);

	virtual BOOL OnWorkerStart(PWORKER_PARAMETER work_para);

	virtual BOOL OnWorkerEnd(PWORKER_PARAMETER work_para);
};
